package com.example.demo.controller;

import com.example.demo.service.TPermissionService;
import com.example.demo.shiro.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.Set;
//import org.springframework.web.bind.annotation.PostMapping;

@Controller
public class MainController {
    @Autowired
    TPermissionService tPermissionService;
    @GetMapping({ "/index" })
    public String index(){
        ShiroUtils.getUser();
//        Set<String> perms = tPermissionService.listPerms(1);
//        System.out.print(perms);
        return "index";
    }

    @GetMapping("/main")
    public String main(){
        return "index_1";
    }
}
